package org.wanda.pv.service.basic.impl;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nutz.dao.Dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.wanda.pv.model.basic.PointRoom;
import org.wanda.pv.service.BaseServiceImpl;
import org.wanda.pv.service.basic.PointRoomService;

/**
 * @author LiuXuyang
 * Created by lxy on 2018/5/8.
 */

@Service
public class PointRoomServiceImpl extends BaseServiceImpl<PointRoom> implements PointRoomService {

    private final Log log = LogFactory.getLog(this.getClass());
    @Autowired
    public PointRoomServiceImpl(Dao dao) {
        super(dao);
    }





    @Override
    public void del(Long id) throws Exception{

        try{
            this.vDelete(id);
        }catch (Exception e){
            log.error(e.getMessage(),e);
            throw e;
        }


    }

    @Override
    public void add(PointRoom pointRoom) throws Exception {

        try{
            this.insert(pointRoom);
        }catch (Exception e){
            log.error(e.getMessage(),e);
            throw e;
        }




    }

    @Override
    public void update(PointRoom pointRoom) throws Exception {

        try{
            pointRoom.setDelFlag(false);
            this.updateIgnoreNull(pointRoom);
        }catch (Exception e){
            log.error(e.getMessage(),e);
            throw e;
        }



    }


}
